/*
 * Copyright 2006-2007 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package asphalt2.event
{
	import flash.events.Event;
	/**
	 * @author c9katayama
	 **/
	public class PageContainerEvent extends Event
	{
		public static const NEXTPAGE:String = "PageContainerEvent_NEXTPAGE";
		private var _nextPage:Class;
		private var _targetPageContainerId:String;
		private var _parameters:Object;
		
		public function PageContainerEvent(targetPageContainerId:String,nextPage:Class,parameters:Object=null){
			//stageで捕まえるため、バブリングさせる
			super(NEXTPAGE,true);
			this._nextPage = nextPage;
			this._targetPageContainerId = targetPageContainerId;
			this._parameters = parameters;
		}
		public function get nextPage():Class{
			return _nextPage;
		}
		public function get targetPageContainerId():String{
			return _targetPageContainerId;
		}
		public function get parameters():Object{
			return _parameters;
		}
		
		//@deprecated
		public function get targetId():String{
			return _targetPageContainerId;			
		}
		//@deprecated
		public function get nextPageProperties():Object{
			return _parameters;
		}
	}
}